/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)aomtr.c	1.6	9/19/95";
#include <farl.h>
#include <agl.h>

/*
 * マテリアルを変更する
 */
void
AGLSetMaterial(Material *mtr, int num)
{
     while (num > 0) {
	mtr->rmat[0] = mtr->ambient;
	mtr->rmat[1] = FarlFixMul1015(mtr->diffuse,
					__AGLLight[0].lightStrength);
	mtr->rmat[2] = FarlFixMul1015(mtr->diffuse,
					__AGLLight[1].lightStrength);
	mtr->rmat[3] = FarlFixMul1015(mtr->specular,
					__AGLLight[0].lightStrength);
	mtr->rmat[4] = FarlFixMul1015(mtr->specular,
					__AGLLight[1].lightStrength);

	num--;
	mtr++;
    }
}
